<?php
	session_start(); 
	ob_start();
	
	require("./inc/config-system.inc.php");
	require("./inc/config-db.inc.php");
	require("./inc/fm.inc.php");
	require("./class/adodb/adodb.inc.php");
	
	// connection database
	$objConn = ADONewConnection(DB_DRIVER); 
	$objConn->Connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ADJUST Form Document Posting</title>
<style type="text/css">
<!--
.center {
	text-align: center;
	font-weight: normal;
	font-size: 14px;
	font-family: "Microsoft Sans Serif";
}
.right {
	text-align: right;
}
.body {
	font-family: "Microsoft Sans Serif";
	font-size: 14px;
	margin-top: 0px;
}
.input {
	font-family: "Microsoft Sans Serif";
	font-size: 14px;
}
.header_center {
	font-family: "Microsoft Sans Serif";
	font-size: 14px;
	text-decoration: underline;
	text-align: center;
	font-weight: bold;
	color: #FFF;
	background-color: #FF0000;
}
.input_disable {
	font-family: "Microsoft Sans Serif";
	font-size: 14px;
	color: #000;
	background-color: #CCC;
}
.input_focus {
	font-family: "Microsoft Sans Serif";
	font-size: 14px;
	background-color: #FFC;
	border: 2px solid #F60;
}

-->
</style>

<link href="./css/datepicker.css" rel="stylesheet" type="text/css" media="screen" />
<link href="./css/slidepanel.css" rel="stylesheet" type="text/css" media="screen" />
<link href="./css/autocomplete.css" rel="stylesheet" type="text/css" media="screen" />

<script type="text/javascript" src="./js/jquery.inc.js"></script>
<script type="text/javascript" src="./js/form.inc.js"></script>
<script type="text/javascript" src="./js/datepicker.inc.js"></script>
<script type="text/javascript" src="./js/livequery.inc.js"></script>
<script type="text/javascript" src="./js/autocomplete.inc.js"></script>
<script type="text/javascript" src="./js/blockui.inc.js"></script>

<?php require("./adj.inc.js.php"); ?>
</head>
<body class="body">

<div id="mainPanel">
    <div id="panel"><?php require("./menu.inc.php"); ?></div> 
    <p class="slide"><a href="#" class="btn-slide">Main Menu</a></p> 
</div>
 
<br /><br />
 
<form id="adj_posting" method="post" action="./adj_post.php">
    <table width="100%" border="0" cellpadding="2" cellspacing="2" class="body">
        <tr class="header_center">
            <td colspan="7">ADJUST Form Document Posting</td>
        </tr>
        <tr>
            <td colspan="7" class="left">&nbsp;</td>
        </tr>
<tr>
            <td colspan="7">Document Date :<br />
            <input name="TXTdoc_date[]" type="text" class="input" id="TXTdoc_date_0" readonly="readonly" /></td>
		</tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td width="2%">PK</td>
            <td width="5%">Account</td>
            <td width="50%">Description</td>
            <td width="12%">Quantity</td>
            <td width="12%">Price/Unit</td>
            <td colspan="2">Amount</td>
		</tr>
        <tr id="rowNo_0">
            <td>
			<?php
				$sqlCommand = "SELECT pk_key, pk_key FROM tbl_postkey ORDER BY pk_key";  
				$recordset = $objConn->Execute($sqlCommand);
				echo $recordset->GetMenu("SELpk[]", "", true, false, 0, "class='input'"); 
            ?>
            </td>
            <td><input name="TXTgl_account[]" type="text" class="input" id="TXTgl_account_0" size="5" /></td>
            <td><input name="TXTdescription[]" type="text" class="input" id="TXTdescription_0" size="100" /></td>
            <td><input name="TXTquantity[]" type="text" class="input" id="TXTquantity_0" /></td>
            <td><input name="TXTprice_unit[]" type="text" class="input" id="TXTprice_unit_0" /></td>
            <td width="15%"><input name="TXTamount[]" type="text" class="input" id="TXTamount_0" /></td>
        </tr>
        <tr id="addNewRow">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td class="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td class="right">Total Amount :</td>
            <td colspan="2"><input name="TXTtotal_amount" type="text" class="input_disable" id="TXTtotal_amount" readonly='readonly' value="" /></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="3" class="right"><input name="BTTnewrow" type="button" class="input" id="BTTnewrow" value="Add Row" />                <label>
                    <input name="BTTremoverow" type="button" class="input" id="BTTremoverow" value="Remove Row" />
            </label></td>
		</tr>
        <tr class="center">
            <td colspan="7">
            	<input name="BTTsimulate" type="submit" class="input" id="BTTsimulate" value="Simulate Document" />
                <input name="BTTpost" type="submit" class="input" id="BTTpost" value="Post Document" />
                <input name="HIDnum_row" id="HIDnum_row" type="hidden" value="0" />            </td>
        </tr>
    </table>
    <br />
    <hr />
</form>
</body>
</html>
<?php ob_end_flush(); ?>
